package org.shs.collector.dao;

import java.util.ArrayList;

import org.shs.collector.form.CollectorForm;
import org.shs.collector.model.CollectorModel;
import org.shs.common.dao.IBaseDAO;
import org.shs.common.utils.DataHolder;

/**
 * Interface specifying the data access methods related to the Collector module.
 * <br/>
 * <br/><b>Created:</b>&nbsp;&nbsp; Dec 23, 2008 1:49:08 AM
 *
 * @author Gunjan
 */
public interface ICollectorDAO extends IBaseDAO
{

   /**
    * Retrieves the list of collectors and related information. This can also 
    * be a list of collectors based upon a search performed on the collector name.
    * @param collectorData TEncapsulates the partial company name and the inactive
    * collector search flag
    * @return The list of all collectors.
    * @throws Exception if query resulted in an error.
    */
   public ArrayList<CollectorModel> getCollectors(DataHolder collectorData) 
   throws Exception;

   /**
    * Retrieves the details for a particular collector.
    * @param collectorId The collector ID whose details are to be fetched.
    * @return The model encapsulating all details about the collector.
    * @throws Exception if query resulted in an error.
    */
   public CollectorModel getCollectorDetails(String collectorId) 
   throws Exception;
  
   /**
    * Inserts details for a new collector.
    * @param collectorData Details for the new collector.
    * @return Generated ID of the new collector.
    * @throws Exception if query resulted in an error.
    */
   public String addCollectorData(CollectorForm collectorData) throws Exception;

   /**
    * Updates the details for an existing collector.
    * @param collectorData Updated details of the collector to be modified.
    * @throws Exception if query resulted in an error.
    */
   public void editCollectorData(CollectorForm collectorData) throws Exception;

   /**
    * Updates the 'active' flag for an existing collector.
    * @param collectorActvData Model containing the 'active' status and the 
    * collector ID for which the flag is to be updated.
    * @throws Exception Thrown if query resulted in an error.
    */
   public void updActiveStatus(DataHolder collectorActvData) throws Exception;
   
}